Contents | Index | < Browse | Browse >

LETTERsignalULETTER Sets event handlers for signals.

Overview
#include <signal.h>

r = signal(signalnumber,f);

void (*r)(int);
int signalnumber;
void (*f)(int);

Portability
ANSI

Description
Specifies the function "f" to be called whenever the signal "signalnumber" is raise'd. The function gets the signal "signalnumber" passed when it's being called, so that the routine can react to multiple signals.

Returns
The function, which previously reacted to the signal, or NULL.

See also
raise , abort